﻿using FreeSql.DataAnnotations;
using IMES.Common.Dtos;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace IMES.Common.Domain.KeepModel
{
	/// <summary>
	/// 工单表
	/// </summary>
	public class workSheet:Audit
	{
		/// <summary>
		/// 工单ID
		/// </summary>
		[Column(IsIdentity = true, IsPrimary = true)]
        public int WorkSheetId { get; set; }
		/// <summary>
		/// 工单编号
		/// </summary>
		[MaxLength(50)]
		public string WorkSheetNumber { get; set; }
		/// <summary>
		/// 产品编号
		/// </summary> 
		public string ProductNumber { get; set; }
		/// <summary>
		/// 计划数
		/// </summary>
		[Range(0, int.MaxValue)]
		public int Numberofpackages { get; set; }

		/// <summary>
		/// 计划开始时间
		/// </summary> 
		public DateTime? ScheduledStartTime { get; set; }
		/// <summary>
		/// 计划结束时间
		/// </summary> 
		public DateTime? ScheduledEndTime { get; set; }
		/// <summary>
		/// 开始时间
		/// </summary> 
		public DateTime? StartTime { get; set; }
		/// <summary>
		/// 结束时间
		/// </summary> 
		public DateTime? EndTime { get; set; }
		/// <summary>
		/// 状态
		/// </summary>
		public WorkSheetState State { get; set; } 
		/// <summary>
		/// 备注
		/// </summary>
		public string? Remark { get; set; }
		/// <summary>
		/// 任务编号
		/// </summary>
		public string TaskIds { get; set; }
		/// <summary>
		/// 产品关联单据
		/// </summary>
        public string? ProductRelatedDocuments { get; set; }
    }
}
/// <summary>
/// 工单状态枚举
/// </summary>
public enum WorkSheetState
{
	未开始 = 1,
	进行中 = 2,
	已完成 = 3,
	已撤回 = 4,
	已取消 = 5
}